import request from '../../utils/request'
import { generateRandomCodeForValidateCode } from '../../utils/randomCodeGenerator'
const api_name = "user"


/**查询用户列表 */
export function getUserListByCondition(condition){
    return request({
        url: `/${api_name}/querypage`,
        method: 'POST',
        data: condition
    })
}

/**根据id查询用户 */
export function getUserById(id){
    return request({
        url: `/${api_name}/get/${id}`,
        method: 'GET'
    })
}

/**新增用户 */
export function addUser(userinfo){
    return request({
        url: `/${api_name}/add`,
        method: 'POST',
        data: userinfo
    })
}

/**修改用户 */
export function editUser(userinfo){
    return request({
        url: `/${group_name}/${api_name}/edit`,
        method: 'PUT',
        data: userinfo
    })
}

/**修改用户 */
export function removeUser(id){
    return request({
        url: `/${group_name}/${api_name}/remove/${id}`,
        method: 'DELETE'
    })
}